/*Source

Problem Id:2695  User Id:Latex 
Memory:72K  Time:0MS
Language:G++  Result:Accepted

Source 
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>

typedef struct 
{
	double x, y;
	double nowdis2;
	bool   ok;
	double xx, yy;
	double getc, lastc;
	
}Tdian;

Tdian dian[120];
int n, start,last;
double maxdis, maxdis2;
Tdian order;

bool first, found;


double mulc(double  t1x, double t1y, double t2x, double t2y)
{
	return (t1x*t2x + t1y*t2y)
			/( sqrt(t1x*t1x + t1y*t1y) * sqrt(t2x*t2x + t2y*t2y) );
}

void checkout()
{
	int i;
	printf("last node = %d, now node = %d \n", last, start);
	for (i=1; i<=n; ++i)
	{
		printf("node: %d , x=%lf, y=%lf, ", i, dian[i].x, dian[i].y);
		printf("getc = %lf, lastc = %lf, ok = %d", dian[i].getc, dian[i].lastc, dian[i].ok);
		printf("\n\n");
		
	}
}

void countdis2()
{
	int i;
	dian[0] = dian[start];
	for (i=1; i<=n; ++i)
		if (i != start)
	{
		dian[i].nowdis2 = (dian[i].x - dian[0].x)*(dian[i].x - dian[0].x)
						  + (dian[i].y - dian[0].y)*(dian[i].y - dian[0].y);
		if (dian[i].nowdis2 < maxdis2 || fabs(dian[i].nowdis2-maxdis2) <1e-7 ) dian[i].ok = true;
		else dian[i].ok = false;
		dian[i].xx = dian[i].x - dian[0].x;
		dian[i].yy = dian[i].y - dian[0].y;
		dian[i].getc = mulc(dian[i].xx, dian[i].yy, order.x ,order.y);
		if (dian[i].getc < 0) dian[i].ok = false;
	}
}

void countlast()
{
	int i;
	double t1, t2;
	t1 = dian[start].x - dian[last].x;
	t2 = dian[start].y - dian[last].y;
	
	for (i=1; i<=n; ++i)
	if (i!=start)
	{
		dian[i].lastc = mulc(t1, t2, dian[i].xx, dian[i].yy);
		if (dian[i].lastc < 0) dian[i].ok = false;
	}
	
}



int main()
{
	int i, site;
	double maxv;
	
//	printf("%lf", mulc(140-240,120-240,240-360,240-120));
	while (1)
	{
		scanf("%lf%lf", &order.x, &order.y);
		scanf("%d", &n);
		scanf("%d", &start);
		scanf("%lf", &maxdis);
		if (n==0 && start==0) break;
		for (i=1; i<=n; ++i)
			scanf("%lf%lf", &dian[i].x, &dian[i].y);
			
		first = true;
		found = true;	
		maxdis2 = maxdis * maxdis;
		last = 0;
		dian[0] = dian[start];
		printf("%d", start);
		while (found)
		{
			found = false;
			countdis2();
			if (!first)
			{
				countlast();
			}
			else  first = false;
			
			maxv = -1;
			site = 0;
			
		//	checkout();
			
			for (i=1; i<=n; ++i)
				if (i!=start)
					if (dian[i].ok)
						if (maxv < dian[i].getc)
						{
							maxv = dian[i].getc;
							site = i;
						}
			if (site) 
			{	found = true;
				printf(" %d", site);
				last = start;
				start = site;
			}
		}
		printf("\n");
	}
	return 0;	
}



